home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Networking / PGPuam / headers / AppleShareFileServerRegistry.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  13.7 KB  |  449 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        AppleShareFileServerRegistry.h
  3.  
  4.      Contains:    Registry records for file server.
  5.  
  6.      Version:    Technology:    AppleShare IP 6.0
  7.                  Release:    ASIP 6.0 SDK - Friday, July 10, 1998 11:16:11 AM
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPLESHAREFILESERVERREGISTRY__
  18. #define __APPLESHAREFILESERVERREGISTRY__
  19.  
  20. #ifndef __FILES__
  21. #include <Files.h>
  22. #endif
  23.  
  24.  
  25.  
  26. #if PRAGMA_ONCE
  27. #pragma once
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37.  
  38. #if PRAGMA_STRUCT_ALIGN
  39.     #pragma options align=mac68k
  40. #elif PRAGMA_STRUCT_PACKPUSH
  41.     #pragma pack(push, 2)
  42. #elif PRAGMA_STRUCT_PACK
  43.     #pragma pack(2)
  44. #endif
  45.  
  46. typedef unsigned char                     Str42[43];
  47. typedef unsigned char                     Str199[200];
  48.  
  49. enum {
  50.     kFSCreatorSig                = FOUR_CHAR_CODE('ipwf')        /* Attribute Signature for FileServer Service object attributes*/
  51. };
  52.  
  53.  
  54. enum {
  55.                                                                 /* Attribute Types for FileServer Service object each attribute */
  56.     kFSServerInfoType            = FOUR_CHAR_CODE('srvr'),        /* ServerInfo*/
  57.     kFSServerGreetingType        = FOUR_CHAR_CODE('gret'),
  58.     kFSCacheInfoType            = FOUR_CHAR_CODE('cach'),
  59.     kFSIdleUserInfoType            = FOUR_CHAR_CODE('idle'),
  60.     kFSAdminInfoType            = FOUR_CHAR_CODE('admm'),
  61.     kFSHTTPInfoType                = FOUR_CHAR_CODE('http'),
  62.     kFSHTTPFolderType            = FOUR_CHAR_CODE('hfol'),
  63.     kFSHTTPFileType                = FOUR_CHAR_CODE('hfil'),
  64.     kFSHTTPPluginType            = FOUR_CHAR_CODE('hplg'),
  65.     kFSMultiWebDirSig            = FOUR_CHAR_CODE('webd'),        /* Multi Domain signature */
  66.     kFSHTTPWebDirCountType        = FOUR_CHAR_CODE('domC'),
  67.     kFSHTTPWebDirType            = FOUR_CHAR_CODE('0000'),
  68.     kFSFTPInfoType                = FOUR_CHAR_CODE('ftp '),
  69.     kFSAFPInfoType                = FOUR_CHAR_CODE('afp '),
  70.     kFSSMBInfoType                = FOUR_CHAR_CODE('smb '),
  71.     kFSMimeType                    = FOUR_CHAR_CODE('mime'),
  72.     kFSIPFilterType                = FOUR_CHAR_CODE('filt'),
  73.     kFSMaxConnection            = FOUR_CHAR_CODE('maxc')        /* max concurrent connection */
  74. };
  75.  
  76. /* Service specific advanced options */
  77.  
  78. enum {
  79.     kFSAFPTCPSig                = FOUR_CHAR_CODE('afpt'),        /* AFP over TCP port signature */
  80.     kFSSMBInfoSig                = FOUR_CHAR_CODE('smb '),        /* SMB over TCP port signature */
  81.     kFSHTTPInfoSig                = FOUR_CHAR_CODE('http'),        /* HTTP port signature */
  82.     kFSFTPInfoSig                = FOUR_CHAR_CODE('ftp ')        /* FTP port signature */
  83. };
  84.  
  85.  
  86. enum {
  87.     kFSPortType                    = FOUR_CHAR_CODE('port'),        /* port number (UInt16) for all services */
  88.     kFSSessionTimeout            = FOUR_CHAR_CODE('ssto')        /* session timeouts for all services (SInt32) */
  89. };
  90.  
  91.  
  92. enum {
  93.     kFSTransferTimeout            = FOUR_CHAR_CODE('trto'),        /* transfer timeout for kFSFTPInfoSig (SInt32) */
  94.     kFSKeepAliveTimeout            = FOUR_CHAR_CODE('kato'),        /* keep alive timeout for kFSHTTPInfoSig (SInt32) */
  95.     kFSCGITimeout                = FOUR_CHAR_CODE('cgto'),        /* CGI timeout for kFSHTTPInfoSig (SInt32) */
  96.     kFSLogSize                    = FOUR_CHAR_CODE('logs')        /* Log Size - for kFSHTTPInfoSig (UInt32) */
  97. };
  98.  
  99. /* UAM information... */
  100.  
  101. enum {
  102.     kFSUAMInfoSig                = FOUR_CHAR_CODE('uam ')        /* Signature */
  103. };
  104.  
  105.  
  106.  
  107. enum {
  108.     kFSNumUAMS                    = FOUR_CHAR_CODE('uamc'),        /* Number of UAMs (UInt32) */
  109.     kFSUAMNames                    = FOUR_CHAR_CODE('uams')        /* UAM names (buffer of packed pascal strings) */
  110. };
  111.  
  112. /*----------------------------------------------------------*/
  113. /*        Server Preference - General Information                */
  114. /*----------------------------------------------------------*/
  115.  
  116. enum {
  117.     kFSServerInfoVersion        = 1
  118. };
  119.  
  120.  
  121.  
  122. struct ServerInfo {
  123.     SInt16                             versionNumber;                /* version number for this record */
  124.     SInt16                             fileServerVersion;            /* version# for file server */
  125.     SInt16                             userActivityLimit;            /* user activity limit in % */
  126.     SInt16                             maxLogin;                    /* maximum client connections */
  127.     SInt16                             maxGuestAccess;                /* maximum number of guest and anonymous logins */
  128.     SInt16                             shutdownMinutes;            /* minutes until shutdown */
  129. };
  130. typedef struct ServerInfo                ServerInfo;
  131. /*----------------------------------------------------------*/
  132. /*        Server Preference - connect info & Login Greeting    */
  133. /*----------------------------------------------------------*/
  134.  
  135. enum {
  136.     kFSServerGreetingVersion    = 1
  137. };
  138.  
  139.  
  140. struct ServerGreeting {
  141.     SInt16                             versionNumber;                /* version number for this record */
  142.     Str199                             greetingMsg;                /* login greeting */
  143. };
  144. typedef struct ServerGreeting            ServerGreeting;
  145. /*----------------------------------------------------------*/
  146. /*        Server Preference - Additional Cache Information    */
  147. /*----------------------------------------------------------*/
  148.  
  149. enum {
  150.     kFSCacheInfoVersion            = 1
  151. };
  152.  
  153.  
  154. struct CacheInfo {
  155.     SInt16                             versionNumber;                /* version number for this record */
  156.     SInt32                             cacheForOthers;                /* memory to be reserved for other applications */
  157. };
  158. typedef struct CacheInfo                CacheInfo;
  159. /*----------------------------------------------------------*/
  160. /*        Server Preference - Idle User Information            */
  161. /*----------------------------------------------------------*/
  162. /* idleFlag bits. */
  163.  
  164. enum {
  165.     kFSIdleDisconEnabledMask    = 0x0001,                        /* allow to disconnect idle users */
  166.     kFSDisconExeptOpenFilesMask    = 0x0002,                        /* if true, disconnect except open file users */
  167.     kFSDisconSuperUserMask        = 0x0004,                        /* if true, isconnect idel super users */
  168.     kFSDisconNormalUserMask        = 0x0008,                        /* if true, disconnect idle normal users */
  169.     kFSDisconGuestUserMask        = 0x0010                        /* if true, disconnect idle guest users */
  170. };
  171.  
  172.  
  173.  
  174. enum {
  175.     kFSIdleUserInfoVersion        = 1
  176. };
  177.  
  178.  
  179. struct IdleUserInfo {
  180.     SInt16                             versionNumber;                /* version number for this record */
  181.     SInt16                             idleFlag;                    /* see above */
  182.     SInt16                             idleMinute;                    /* max # of minute for idle users */
  183.     Str199                             disconnectMsg;                /* disconnect message */
  184. };
  185. typedef struct IdleUserInfo                IdleUserInfo;
  186. /*----------------------------------------------------------*/
  187. /*        Server Preference - Serial Miscelleneous Information*/
  188. /*----------------------------------------------------------*/
  189.  
  190. enum {
  191.     kFSAdminInfoVersion            = 1
  192. };
  193.  
  194.  
  195. struct AdminInfo {
  196.     SInt16                             versionNumber;                /* version number for this record */
  197.     Str31                             namePhone;                    /* name & phone */
  198.     Str31                             organization;                /* organization */
  199. };
  200. typedef struct AdminInfo                AdminInfo;
  201. /*----------------------------------------------------------*/
  202. /*        Server Preference - HTTP Information                */
  203. /*----------------------------------------------------------*/
  204. /* Flag bits.     */
  205.  
  206. enum {
  207.     kFSMultiDomainEnabled        = 0x0001,                        /* allow multi-domain support */
  208.     kFSDirListingEnabled        = 0x0002,                        /* allow directory listing */
  209.     kFSAutoShareWebFolder        = 0x0004                        /* if on, web folder share point at start up; server will clear */
  210. };
  211.  
  212.  
  213. enum {
  214.     kFSHTTPServiceInfoVersion    = 2
  215. };
  216.  
  217.  
  218. enum {
  219.     kFSHTTPEnable                = 1,                            /* enable HTTP*/
  220.     kFSHTTPLogEnable            = 1,                            /* enable HTTP Log*/
  221.     kFSHTTPGuestEnable            = 1                                /* guest turned on for HTTP*/
  222. };
  223.  
  224.  
  225. struct HTTPServiceInfo {
  226.     SInt16                             versionNumber;                /* version number for this record */
  227.     SInt16                             enabled;                    /* Enable HTTP, 1-enable, 0-not enable */
  228.     SInt16                             status;
  229.     SInt16                             logEnabled;                    /* Enable HTTP Log, 1-enable, 0-not enable */
  230.     SInt16                             maxConnect;                    /* HTTP maximum client connections */
  231.     SInt16                             guestEnabled;                /* Whether guest allowed for HTTP */
  232.     SInt32                             flag;                        /* new field for ASIP6 */
  233. };
  234. typedef struct HTTPServiceInfo            HTTPServiceInfo;
  235.  
  236. struct HTTPFolderRec {
  237.     SInt16                             vRefNum;                    /* HTML folder path vRefNum*/
  238.     Str27                             volumeName;                    /* HTML folder path volume name*/
  239.     UInt32                             volCreateDate;                /* HTML folder path volume creation date*/
  240.     SInt32                             dirID;                        /* HTML folder path DirID*/
  241. };
  242. typedef struct HTTPFolderRec            HTTPFolderRec;
  243.  
  244. struct HTTPFileRec {
  245.     Str255                             partialPath;                /* partial path to HTML file starting from the Web folder */
  246. };
  247. typedef struct HTTPFileRec                HTTPFileRec;
  248.  
  249. enum {
  250.     kFSPlugInEnable                = 1,                            /* enable Plug-ins*/
  251.     kFSPlugInLoggingEnable        = 1                                /* enable Plug-in logging*/
  252. };
  253.  
  254.  
  255. struct HTTPPlugInsRec {
  256.     SInt16                             pluginEnable;                /* Plug-ins,  1-enable, 0-not enable */
  257.     SInt16                             loggingEnable;                /* Plug-in logging, 1-enable, 0-not enable */
  258.     SInt32                             memSize;                    /* Plug-in memory allocation */
  259.     FSSpec                             preProcessorSpec;            /* Preprocessor plugin spec */
  260.     FSSpec                             postProcessorSpec;            /* Postprocessor plugin spec */
  261.     FSSpec                             errorSpec;                    /* Error plugin spec */
  262. };
  263. typedef struct HTTPPlugInsRec            HTTPPlugInsRec;
  264.  
  265. struct VolSpec {
  266.     Str32                             vName;                        /* pascal string because FSSpec uses pascal string*/
  267.     UInt8                             filler;
  268.     SInt16                             vRefNum;
  269.     UInt32                             vCreateDate;
  270. };
  271. typedef struct VolSpec                    VolSpec;
  272.  
  273. enum {
  274.     kFSHTTPWebDirCountRecVersion = 1
  275. };
  276.  
  277.  
  278. struct HTTPWebDirCountRec {
  279.     UInt16                             count;                        /* How many HTTPWebDirRec there are */
  280.     SInt16                             version;                    /* Version of the HTTPWebDirRec */
  281. };
  282. typedef struct HTTPWebDirCountRec        HTTPWebDirCountRec;
  283.  
  284. enum {
  285.     kFSWebFolderEnabled            = 1
  286. };
  287.  
  288.  
  289. enum {
  290.     kFSAddressTypeDNS            = 0,
  291.     kFSAddressTypeIPAddress        = 1
  292. };
  293.  
  294.  
  295. struct HTTPWebDirRec {
  296.     UInt16                             enabled;                    /* 1 == this web folder enabled, 0 == disabled */
  297.     SInt16                             addressType;                /* Indicates how to decode addressText: 0 == DNS name, 1 = IP Address (in ASCII) */
  298.     Str63                             addressText;                /* Domain name or IP address (in ASCII) of this web folder (pascal str) See addressType field */
  299.     UInt16                             portNumber;                    /* Port number for this web folder's IP address (InetPort) */
  300.     VolSpec                         volSpec;                    /* Volume specifier */
  301.     SInt32                             dirID;                        /* Dir ID of this web folder */
  302. };
  303. typedef struct HTTPWebDirRec            HTTPWebDirRec;
  304. /*----------------------------------------------------------*/
  305. /*        Server Preference - FTP Information                    */
  306. /*----------------------------------------------------------*/
  307.  
  308. enum {
  309.     kFSFTPServiceInfoVersion    = 1
  310. };
  311.  
  312.  
  313. struct FTPServiceInfo {
  314.     SInt16                             versionNumber;                /* version number for this record */
  315.     SInt16                             ftpEnable;                    /* Enable FTP, 1-enable, 0-not enable */
  316.     SInt16                             status;
  317.     SInt16                             ftpAnonymousEnable;            /* Enable Anonymous Login, 1-enable, 0-not enable */
  318. };
  319. typedef struct FTPServiceInfo            FTPServiceInfo;
  320. /*----------------------------------------------------------*/
  321. /*        Server Preference - AFP Information                    */
  322. /*----------------------------------------------------------*/
  323.  
  324. enum {
  325.     kFSAFPServiceInfoVersion    = 1
  326. };
  327.  
  328.  
  329. struct AFPServiceInfo {
  330.     SInt16                             versionNumber;                /* version number for this record */
  331.     SInt16                             afpOverTCPIPEnable;            /* Enable AFP over TCPIP, 1-enable, 0-not enable */
  332.     SInt16                             afpOverTCPIPStatus;
  333.     SInt16                             afpOverATalkEnable;            /* Enable AFP over AppleTalk, 1-enable, 0-not enable */
  334. };
  335. typedef struct AFPServiceInfo            AFPServiceInfo;
  336. /*----------------------------------------------------------*/
  337. /*        Server Preference - SMB Information                    */
  338. /*----------------------------------------------------------*/
  339.  
  340. enum {
  341.     kFSSMBServiceInfoVersion    = 1
  342. };
  343.  
  344.  
  345. enum {
  346.     kFSSMBMaxNetBIOSnameLength    = 15,
  347.     kFSSMBMaxWorkGroupLength    = 15,
  348.     kFSSMBMaxCommentLength        = 43,
  349.     kFSSMBWINSAddressLength        = 62
  350. };
  351.  
  352.  
  353. struct SMBServiceInfo {
  354.     SInt16                             versionNumber;                /* version number for this record */
  355.     SInt16                             smbEnable;                    /* Enable SMB, 1-enable, 0-not enable */
  356.     SInt16                             status;
  357.     SInt16                             guestEnabled;                /* Whether guest allowed for SMB */
  358.     Str31                             netBIOSname;                /* Server name. Limited to 15 bytes */
  359.     Str31                             workGroup;                    /* NETBIOS group name.  Limited to 15 bytes */
  360.     Str63                             comment;                    /* ASCII comment for the server. Limited to 43 bytes */
  361.     SInt16                             winsEnabled;                /* Enable WINS, 1-enable, 0-not enable */
  362.     Str63                             winsAddress;                /* WINS IP address */
  363.  
  364. };
  365. typedef struct SMBServiceInfo            SMBServiceInfo;
  366. /*----------------------------------------------------------------------*/
  367. /*        MIME type changes - Notify server SrvrMimeTypePrefs has changed    */
  368. /*----------------------------------------------------------------------*/
  369.  
  370. enum {
  371.     kFSMimeTypeChangedVersion    = 1
  372. };
  373.  
  374.  
  375. struct MimeTypeChanged {
  376.     SInt16                             version;                    /* version number for this record */
  377.     SInt32                             counter;                    /* no meaning, just for notification */
  378. };
  379. typedef struct MimeTypeChanged            MimeTypeChanged;
  380. /*----------------------------------------------------------*/
  381. /*        IPFilter Options - Advanced option for filtering IP */
  382. /*----------------------------------------------------------*/
  383.  
  384. enum {
  385.     kFSIPFilterAllow            = 1
  386. };
  387.  
  388. /* Structure of individual filters */
  389.  
  390. struct IPFilterStruct {
  391.     SInt16                             allow;                        /* 0 for disallow, 1 for allow */
  392.     UInt32                             highIPBytes;
  393.     UInt32                             lowIPBytes;
  394. };
  395. typedef struct IPFilterStruct            IPFilterStruct;
  396.  
  397. enum {
  398.     kFSMaxIPFilters                = 10
  399. };
  400.  
  401.  
  402. struct IPFilterInfo {
  403.     SInt16                             versionNumber;                /* version number for this record */
  404.     SInt16                             numFilters;                    /* numberOfIPFilters */
  405.     IPFilterStruct                     filters[10];
  406. };
  407. typedef struct IPFilterInfo                IPFilterInfo;
  408. /*----------------------------------------------------------*/
  409. /*        Max connection information                            */
  410. /*----------------------------------------------------------*/
  411. /*
  412.    tags for this record are type:kFSCreatorSig  and attribute:kFSMacConnextion
  413.    this value will be used if the max connection number encoded in serial number is 250
  414. */
  415.  
  416. enum {
  417.     kFSServerMaxConnectionInfoVersion = 1
  418. };
  419.  
  420.  
  421. struct ServerMaxConnectionInfo {
  422.     SInt16                             version;
  423.     SInt32                             flag;                        /* reserved for future use */
  424.     SInt32                             maxConnection;
  425. };
  426. typedef struct ServerMaxConnectionInfo    ServerMaxConnectionInfo;
  427. /* ------------------------------------------------------------------------------------------------- */
  428.  
  429. #if PRAGMA_STRUCT_ALIGN
  430.     #pragma options align=reset
  431. #elif PRAGMA_STRUCT_PACKPUSH
  432.     #pragma pack(pop)
  433. #elif PRAGMA_STRUCT_PACK
  434.     #pragma pack()
  435. #endif
  436.  
  437. #ifdef PRAGMA_IMPORT_OFF
  438. #pragma import off
  439. #elif PRAGMA_IMPORT
  440. #pragma import reset
  441. #endif
  442.  
  443. #ifdef __cplusplus
  444. }
  445. #endif
  446.  
  447. #endif /* __APPLESHAREFILESERVERREGISTRY__ */
  448.  
  449.